//
//  Point2d.m
//  FirstGridApp
//
//  Created by Andrew Spina on 4/19/10.
//  Copyright 2010 STScI. All rights reserved.
//

#import "Point2d.h"


@implementation Point2d

@synthesize x;
@synthesize y;

+ (Point2d *) createPointAtX: (int) x andY: (int) y {
	Point2d * point = [Point2d alloc];
	point.x = x;
	point.y = y;
	return point;
}

- (BOOL) equalsPoint: (Point2d *) point {
	return x == point.x && y == point.y;
}

- (NSString *) description {
	return [NSString stringWithFormat:@"%d, %d", x, y];
}

@end
